package 曾世昌12_9.zuoye2;

import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;

import java.util.List;

public class demo {
    public static void main(String[] args) throws Exception {
        SAXReader saxReader = new SAXReader();
        Document read = saxReader.read( "E:\\untitled5\\src\\mxdx3\\day6\\zuoye2\\cars.xml" );
        Element root = read.getRootElement();
        List<Element> value = root.elements( "VALUE" );
        for (Element element : value) {
            List <Element>date = element.elements( "NO" );
            for (Element element1 : date) {
                System.out.println("车牌号："+element1.attributeValue( "DATE" ));

            }
            System.out.println("车主地址："+element.elementText( "ADDR" ));
        }
    }
}
